package com.sunny.fetch.pojo;

import java.util.ArrayList;
import java.util.List;

public class SunUrlExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SunUrlExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andUrlIdIsNull() {
            addCriterion("url_id is null");
            return (Criteria) this;
        }

        public Criteria andUrlIdIsNotNull() {
            addCriterion("url_id is not null");
            return (Criteria) this;
        }

        public Criteria andUrlIdEqualTo(Long value) {
            addCriterion("url_id =", value, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlIdNotEqualTo(Long value) {
            addCriterion("url_id <>", value, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlIdGreaterThan(Long value) {
            addCriterion("url_id >", value, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlIdGreaterThanOrEqualTo(Long value) {
            addCriterion("url_id >=", value, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlIdLessThan(Long value) {
            addCriterion("url_id <", value, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlIdLessThanOrEqualTo(Long value) {
            addCriterion("url_id <=", value, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlIdIn(List<Long> values) {
            addCriterion("url_id in", values, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlIdNotIn(List<Long> values) {
            addCriterion("url_id not in", values, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlIdBetween(Long value1, Long value2) {
            addCriterion("url_id between", value1, value2, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlIdNotBetween(Long value1, Long value2) {
            addCriterion("url_id not between", value1, value2, "urlId");
            return (Criteria) this;
        }

        public Criteria andUrlHashIsNull() {
            addCriterion("url_hash is null");
            return (Criteria) this;
        }

        public Criteria andUrlHashIsNotNull() {
            addCriterion("url_hash is not null");
            return (Criteria) this;
        }

        public Criteria andUrlHashEqualTo(Long value) {
            addCriterion("url_hash =", value, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlHashNotEqualTo(Long value) {
            addCriterion("url_hash <>", value, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlHashGreaterThan(Long value) {
            addCriterion("url_hash >", value, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlHashGreaterThanOrEqualTo(Long value) {
            addCriterion("url_hash >=", value, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlHashLessThan(Long value) {
            addCriterion("url_hash <", value, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlHashLessThanOrEqualTo(Long value) {
            addCriterion("url_hash <=", value, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlHashIn(List<Long> values) {
            addCriterion("url_hash in", values, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlHashNotIn(List<Long> values) {
            addCriterion("url_hash not in", values, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlHashBetween(Long value1, Long value2) {
            addCriterion("url_hash between", value1, value2, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlHashNotBetween(Long value1, Long value2) {
            addCriterion("url_hash not between", value1, value2, "urlHash");
            return (Criteria) this;
        }

        public Criteria andUrlStrIsNull() {
            addCriterion("url_str is null");
            return (Criteria) this;
        }

        public Criteria andUrlStrIsNotNull() {
            addCriterion("url_str is not null");
            return (Criteria) this;
        }

        public Criteria andUrlStrEqualTo(String value) {
            addCriterion("url_str =", value, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrNotEqualTo(String value) {
            addCriterion("url_str <>", value, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrGreaterThan(String value) {
            addCriterion("url_str >", value, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrGreaterThanOrEqualTo(String value) {
            addCriterion("url_str >=", value, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrLessThan(String value) {
            addCriterion("url_str <", value, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrLessThanOrEqualTo(String value) {
            addCriterion("url_str <=", value, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrLike(String value) {
            addCriterion("url_str like", value, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrNotLike(String value) {
            addCriterion("url_str not like", value, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrIn(List<String> values) {
            addCriterion("url_str in", values, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrNotIn(List<String> values) {
            addCriterion("url_str not in", values, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrBetween(String value1, String value2) {
            addCriterion("url_str between", value1, value2, "urlStr");
            return (Criteria) this;
        }

        public Criteria andUrlStrNotBetween(String value1, String value2) {
            addCriterion("url_str not between", value1, value2, "urlStr");
            return (Criteria) this;
        }

        public Criteria andCommentIsNull() {
            addCriterion("comment is null");
            return (Criteria) this;
        }

        public Criteria andCommentIsNotNull() {
            addCriterion("comment is not null");
            return (Criteria) this;
        }

        public Criteria andCommentEqualTo(String value) {
            addCriterion("comment =", value, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentNotEqualTo(String value) {
            addCriterion("comment <>", value, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentGreaterThan(String value) {
            addCriterion("comment >", value, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentGreaterThanOrEqualTo(String value) {
            addCriterion("comment >=", value, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentLessThan(String value) {
            addCriterion("comment <", value, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentLessThanOrEqualTo(String value) {
            addCriterion("comment <=", value, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentLike(String value) {
            addCriterion("comment like", value, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentNotLike(String value) {
            addCriterion("comment not like", value, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentIn(List<String> values) {
            addCriterion("comment in", values, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentNotIn(List<String> values) {
            addCriterion("comment not in", values, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentBetween(String value1, String value2) {
            addCriterion("comment between", value1, value2, "comment");
            return (Criteria) this;
        }

        public Criteria andCommentNotBetween(String value1, String value2) {
            addCriterion("comment not between", value1, value2, "comment");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}